function display_obj(o){
    if(!o) return;
    for(p in o){
        console.log(p);
        console.log("\n");
        console.log(o[p]);
        console.log("\n");
    }
    return;
}

var person={
    name:"zhangsan",
    age:19,
    city:"anhui"
}
display_obj(person);
console.log(display_obj(person));
// debugger

console.log("---------------------简写代码-------------------");
with(person){
    console.log(name);
    console.log(age);
    console.log(city);
    
}

